package com.example.obmb.common.base;

import lombok.Getter;

/**
 * @Author qiuhongyu
 * @Date 2024/10/22 10:41
 * 响应码列表
 */

@Getter
public enum ResponseCode {

    SUCCESS(200, "成功", "success"),

    BAD_REQUEST(400, "错误请求", "Bad Request"),

    UNAUTHORIZED(401, "未授权", "Unauthorized"),

    FORBIDDEN(403, "禁止的", "Forbidden"),

    NOT_FOUND(404, "未找到", "Not Found"),

    METHOD_NOT_ALLOWED(405, "不支持当前请求类型",""),

    INTERNAL_SERVER_ERROR(500, "系统内部错误", "Internal Server Error"),

    REQUEST_ERROR(1000, "请求异常,稍后重试", "Try again later"),


    ;

    private final int code;

    private final String msg_CN;

    private final String msg_EN;

    ResponseCode(int code, String msg_CN, String msg_EN) {
        this.code = code;
        this.msg_CN = msg_CN;
        this.msg_EN = msg_EN;
    }

}
